package net.base;

import java.util.List;
import java.util.Map;

/**
 * @author: jiangxiangwei
 * @date: 2009-12-15
 */
public interface BaseDao {
	/**
	 * 数据库插入操作 单条插入
	 * 
	 * @param sqlid
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public Object insert(String sqlid, Map map) throws Exception;

	/**
	 * 数据库更新操作 单条更新
	 * 
	 * @param sqlid
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public int update(String sqlid, Map map) throws Exception;

	/**
	 * 数据库删除操作 批量删除
	 * 
	 * @param sqlid
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(String sqlid, String id) throws Exception;

	/**
	 * 取列表 返回list
	 * 
	 * @param sqlid
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public List getList(String sqlid, Map map) throws Exception;

	/**
	 * 取记录总数
	 * 
	 * @param sqlid
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public int getListCount(String sqlid, Map map) throws Exception;

	/**
	 * 取单条数据 返回map
	 * 
	 * @param sqlid
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public Map getMap(String sqlid, Map map) throws Exception;

}
